Skip to content
This repository has been archived by the owner on Feb 8, 2018. It is now read-only.

Fix https://github.com/felicity-iiith/contest-portal-frontend/issues/1 #4

Closed
wants to merge 3 commits into from
Closed

Fix https://github.com/felicity-iiith/contest-portal-frontend/issues/1 #4

wants to merge 3 commits into from

Conversation

Kunalgarg2100
Copy link
Contributor

Added UI for links to previous and next page as buttons. Linking of the buttons is not done

<p>
{question.body}
</p>
{error && <div className="error">ERROR: {error}</div>}
<ul class="Nav">
<li><a rel="prev" href="question/1" id="prv">&lt; Prev</a></li>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I wanted is that you use props.params.qno and find the previous and the next question number. Note that this would be a string so parseInt it at the start of the render function and use that with template strings in the url routes.

@@ -17,3 +17,47 @@
.error {
color: red;
}

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We use milligram CSS and want to keep additional styling as minimal as possible. Please use buttons. This is because we want to later easily change this styling (the lower the classes, the easier it is to change) for each year's theme

@@ -9,7 +9,11 @@ export default () => (
{!window.email ?
<li className="navigation-item"><Link to='/login' className="navigation-link">Login</Link></li>
:
<li className="navigation-item"><Link to='/logout' className="navigation-link">Logout</Link></li>
<li className="navigation-item">
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Each item is supposed to be a different "navigation-item" (especially when we hover over it and highlight. As react can only have one element in an conditional statement, bring the <ul clssname... from up into the condition values.

@@ -9,7 +9,11 @@ export default () => (
{!window.email ?
<li className="navigation-item"><Link to='/login' className="navigation-link">Login</Link></li>
:
<li className="navigation-item"><Link to='/logout' className="navigation-link">Logout</Link></li>
<li className="navigation-item">
<Link to='/' className="navigation-link">Hello {window.email}&nbsp;&nbsp;</Link>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Indent when you are defining a child (<Link>) of an element (<li>)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also I would like that you make 2 commits as this is another issue. Atomic commits help going back in the project history

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sorry my bad, you already made two. When making the commits, also give a brief description of the issue as in

Add username in navbar (Fixes #2)

@meghprkh meghprkh closed this Sep 26, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants